home *** CD-ROM | disk | FTP | other *** search
- Path: news.nask.org.pl!usenet
- From: flssoft@blue.maloka.waw.pl (Grzegorz (FLS))
- Newsgroups: comp.lang.c++
- Subject: Re: Turbo C++ won't write 0Ah to file!?!?
- Date: Mon, 01 Apr 1996 22:22:43 GMT
- Organization: Research and Academic Computer Network
- Message-ID: <4jph9f$fq9@bilbo.nask.org.pl>
- References: <4jnpcg$nis@tribune.concentric.net>
- NNTP-Posting-Host: s112.maloka.waw.pl
- X-Newsreader: Forte Free Agent v0.46
-
- mikolaj@concentric.com wrote:
-
- >Turbo C++ 3.0 won't write character 0Ah to a file, instead it writes 0Dh.
- >What's the problem? Is this a bug?
- >Thanks, Mike.
-
- Hi Mikolaj,
-
- Try to change a file open mode. 0x0A it is '\n' character. If you are
- writing to a text file, '\n' is converted to "\r\n" string.In the
- result you will have 0x0D 0x0A characters in the file. Note that the
- mode in which is opened the file depends on arguments (const char*
- mode), and if you do not give not 't' neither 'b', the mode depends on
- _fmode global variable.
-
-
- Regards,
- Grzegorz.
-
-
-